﻿using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using PortalWeb.CMS.Core.Entity;
using PortalWeb.Core.Entity;

namespace PortalWeb.CMS.Dao
{
    public class ApplicationDbContext : DbContext
    {
        public ApplicationDbContext()
            : base("CmsDbConnection")
        {
            Database.CreateIfNotExists();
        }
        public static ApplicationDbContext Create()
        {
            return new ApplicationDbContext();
        }

        public DbSet<Article> ArticleSet { get; set; }
        public DbSet<Product> ProductSet { get; set; }
        public DbSet<Comment> FeedbackSet { get; set; }
        public DbSet<SiteInfo> SiteInfoSet { get; set; }
        public DbSet<Jobs> JobsSet { get; set; }
        public DbSet<Attachment> AttachmentSet { get; set; }
        public DbSet<CommonModel> CommonModelSet { get; set; }
        public DbSet<Category> CategorySet { get; set; }
    }
}
